package com.sxt.springcloud.opd;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sxt.opd.domain.Patient;
import com.sxt.opd.vo.PatientVo;
import com.sxt.springcloud.opd.fallback.PatientClientFallbackService;
import com.sxt.sys.common.DataGridView;
import com.sxt.sys.common.ResultObj;
import org.apache.commons.lang3.StringUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

@Component
@FeignClient(value = "SPRINGCLOUD-PROVIDER-OPD",fallbackFactory = PatientClientFallbackService.class)
@RequestMapping("/p/patient")
public interface PatientClientService {
    /**
     * 查询
     */
    @RequestMapping("loadAllPatient")
    DataGridView loadAllPatient(@RequestBody PatientVo patientVo);

    /**
     * 添加
     */
    @RequestMapping("addPatient")
    ResultObj addPatient(@RequestBody PatientVo patientVo);

    /**
     * 修改
     */
    @RequestMapping("updatePatient")
    ResultObj updatePatient(@RequestBody PatientVo patientVo);

    /**
     * 删除
     */
    @RequestMapping("deletePatient")
    ResultObj deletePatient(@RequestParam("id") Integer id);

    /**
     * 批量删除
     */
    @RequestMapping("batchDeletePatient")
    ResultObj batchDeletePatient(@RequestBody PatientVo patientVo);

    /**
     * 根据供应商ID查询商品信息
     */
    @RequestMapping("loadPatientById")
    DataGridView loadPatientById(@RequestParam("id") Integer id);
}
